<template>
	<u-empty mode="list" :icon="noDataUrl" :width="width" :height="height" :text="tips"></u-empty>
</template>

<script>
	export default {
		props: {
			mode: {
				type: String,
				default: 'data'
			},
			width: {
				type: Number,
				default: 150
			},
			height: {
				type: Number,
				default: 150
			},
			mapClass: {
				type: [Array, Object],
				default: null
			},
			tips: {
				type: String,
				default: '暂无数据'
			},
			iconUrl: {
				type: String,
				default: ''
			},
			index: {
				type: Number,
				default: 0
			}
		},
		data() {
			const v = this
			let iconType = ['no-data.png', 'no-data2.png', 'no-data3.png','no-data4.png']
			return {
				icon: '',
				noDataUrl: this.$config.server_pic_url + iconType[this.index]
			}
		},
		watch: {
			iconUrl: function (val, oldVal) {
				this.icon = val? val:this.noDataUrl
			}
		}
	}
</script>

